import BaseModel from "../baseModel.js";

class DiaryModel extends BaseModel {
    /**
     * 
     * @param {DiaryModel} model 
     */
    constructor(model) {
        super(model);
        /* 自定义属性以及重载 */
        this.userID = BaseModel.CheackNull(model.userID);
        this.petID = model.petID;
        this.address = model.address;
        this.issueTime = new Date(model.issueTime);
        this.introduction = model.introduction;
        this.introductionSrc = model.introductionSrc;
        this.isPassed = DiaryModel.CheackBoolean(model.isPassed)
    }
    static Instance = 'diary' // 表名
}
export default DiaryModel;